<template>
  <div>
    <el-form
      label-position="right"
      label-width="80px"
      :rules="iphoneRules"
      :model="iphoneInfo"
    >
      <el-form-item label="手机号码" prop="iphone">
        <el-input v-model="iphoneInfo.iphone"></el-input>
      </el-form-item>
      <el-form-item label="验证码" prop="code">
        <div class="code-content">
          <el-input v-model="iphoneInfo.code"></el-input>
          <el-button type="primary" class="code">获取验证码</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from "vue";
import { iphoneRules } from "../config/rules-config";
export default defineComponent({
  setup() {
    const iphoneInfo = reactive({
      iphone: "",
      code: ""
    });
    return { iphoneRules, iphoneInfo };
  }
});
</script>

<style scoped>
.code-content {
  display: flex;
  width: 100%;
}
.code {
  margin-left: 20px;
}
</style>
